<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    .box{
        width: 1000px;
        height: 1000px;
        background-color: bisque;
        display: flex;
        flex-direction: column-reverse;
        flex-wrap: wrap-reverse;
    }
    .box div{
        width: 500px;
        height: 500px;
        background-color: blueviolet;
        color: white;
    }
</style>
<body>
    <div class="box">
        <div>a</div>
        <div>b</div>
        <div>c</div>
        <div>d</div>
        <div>e</div>
        <div>f</div>
        <div>g</div>
        <div>h</div>
    </div>
</body>
</html>